package com.ftg.learn;

import okhttp3.OkHttpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 我想用这个工程访问 demo /hello
 * demo : 实例 2
 * /demo/hello 访问
 * 微服务框架下面的  nacos 实现  流量分发
 * 负载均衡  :
 *
 * @author 布衣
 */
@SpringBootApplication
//开启feign客户端
@EnableFeignClients
public class App {

    @Bean
    public okhttp3.OkHttpClient okHttpClient() {
        return new OkHttpClient();
    }

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }


}
